package com.ssm.mapper;

import com.ssm.pojo.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CustomerMapper {

    /**
     * if、trim使用实例
     */
    List<Customer> findCustomerByNameAndJobs(Customer customer);

    /**
     * <choose>(<when>、<otherwise>)元素使用
     * @param customer
     * @return
     */
    List<Customer> findCustomerByNameOrJobs(Customer customer);

    /**
     * bind使用  了解即可
     * @param userName
     * @return
     */
    List<Customer> findCustomerByName(@Param("userName")String userName);

    /**
     * <set>元素 使用
     * @param customer
     * @return
     */
    int updateCustomerBySet(Customer customer);

    int updateCustomerByTrim(Customer customer);


    List<Customer> findByArray(Integer[] ids);

    List<Customer> findByList(List<Integer> ids);

    List<Customer> findByMap(Map<String,Object> map);

    int insertCustomer(Customer customer);

    int insertCustomerBatch(List<Customer> list);
}
